package com.team5101.dao;

import com.team5101.pojo.LagouUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


public interface LagouUserDao extends JpaRepository<LagouUser,Long> {

    @Query(value = "SELECT * FROM lagou_user WHERE username = ?1",nativeQuery = true)
    LagouUser getByUsername(String username);

    @Query(value = "SELECT * FROM lagou_user WHERE username = ?1 AND password = ?2",nativeQuery = true)
    LagouUser getByUsernameAndPassword(String username, String password);
}
